-- GENERATED SPELL FOR [Hand of the Deceiver] --


function spell0_25588(pUnit, Event) --@Felfire Portal,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(46875,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_25588', 1, 1)
end

function spell1_25588(pUnit, Event) --@Shadow Bolt Volley,Self--
pUnit:FullCastSpellOnTarget(45770,pUnit)
pUnit:RegisterEvent('Sorts_25588', 7289, 1)
end

function spell2_25588(pUnit, Event) --@Shadow Infusion,Self--
pUnit:FullCastSpellOnTarget(45772,pUnit)
pUnit:RegisterEvent('Sorts_25588', 603, 1)
end

function Sorts_25588(pUnit, Event)
local choix_sorts_25588 = math.random(0, 2)
if choix_sorts_25588 == 0 then
pUnit:RegisterEvent('spell0_25588', 1, 1)
end
if choix_sorts_25588 == 1 then
pUnit:RegisterEvent('spell1_25588', 1, 1)
end
if choix_sorts_25588 == 2 then
pUnit:RegisterEvent('spell2_25588', 1, 1)
end
end

function mob25588_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25588', math.random(1500, 3000), 1)
end

function mob25588_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25588_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25588_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25588, 1, 'mob25588_Action')
RegisterUnitEvent(25588, 2, 'mob25588_Leave')
RegisterUnitEvent(25588, 3, 'mob25588_Kill')
RegisterUnitEvent(25588, 4, 'mob25588_Die')
